Dynamic Reporting

Workshop at the UZH Reproducibility Day 2023

Samuel Pawel and Felix Hofmann

Center for Reproducible Science (CRS)

Schedule

  1. What is dynamic reporting?

  2. How to do dynamic reporting?

  3. Hands-on exercises

Manual reporting workflow

What are the disadvantages?

  • tedious and error-prone
  • not directly reproducible
  • difficult to share/reuse
  • new data → need to repeat everything

Dynamic reporting workflow

R Markdown

  • R programming language
    (> 60 other also possible)

  • .Rmd files

  • Markdown text markup language

  • HTML, PDF, DOCX output formats (and more)

  • rmarkdown is an R package

knitr

  • Programming language: R
    (> 60 other also possible)

  • .Rnw files

  • Markup languages: LaTeX
    (+ HTML, Markdown, and more)

  • HTML, PDF, DOCX output formats (and more)

  • knitr is an R package

Quarto

  • Programming language: R, Python, Julia

  • .qmd files

  • Markup language: Markdown

  • HTML, PDF, DOCX output formats (and more)

  • Evolution of R Markdown

  • quarto is a separate program

Which tool for whom?

  • rmarkdownR users (beginner to advanced)
  • knitrR+LaTeX users (intermediate to advanced)
  • quartoR/Python/Julia users (beginner to advanced)

Exercises

  1. Download the data sets from https://github.crsuzh/dynamicReporting/XXXXX

  2. Produce a dynamic report with the tool of your choice. Use the data from 2020 to compute …. Make a chart of …. Automate

  3. Now use the data from 2020 and 2021 and rerun your analysis